package java_3;

import java.util.Arrays;
import java.util.Scanner;

class Rectangle {
	private int width;
	private int length;
	
	
	public Rectangle(int width, int b) {
		super();
		this.width = width;
		this.length = b;
	}
	public int getWidth() {
		return width;
	}
	public void setWidth(int width) {
		this.width = width;
	}
	public int getLength() {
		return length;
	}
	public void setLength(int length) {
		this.length = length;
	}
	public int getPerimeter(){
		return (length+width)*2;
		
	}
	public int getArea(){
		return length*width;
		
	}
	@Override
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}
	

}
class Circle{
	private int radius;
	
	

	public Circle(int radius) {
		super();
		this.radius = radius;
	}

	public int getRadius() {
		return radius;
	}

	public void setRadius(int radius) {
		this.radius = radius;
	}
	public int getPerimeter(){
		return (int) (radius*2*Math.PI);
	
		
	}
	public int getArea(){
		return (int) (radius*radius*Math.PI);
		
	}

	@Override
	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
	
	
	
}
public class Main{
	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		Rectangle[] rectangle=new Rectangle[2];
		Circle[] circle=new Circle[2];
		rectangle[0]=new Rectangle(sc.nextInt(),sc.nextInt());
		rectangle[1]=new Rectangle(sc.nextInt(),sc.nextInt());
		circle[0]=new Circle(sc.nextInt());
		circle[1]=new Circle(sc.nextInt());
		int perimeter = 0;
		int area = 0;
		for (Rectangle rec : rectangle) {
			perimeter+=rec.getPerimeter();
			area+=rec.getArea();
		}
		for (Circle circle2 : circle) {
			perimeter+=circle2.getPerimeter();
			area+=circle2.getArea();
		}
		System.out.println(perimeter);
		System.out.println(area);
		System.out.println(Arrays.deepToString(rectangle));
		System.out.println(Arrays.deepToString(circle));
		
	}
}


//[Rectangle [width=1, length=1], Rectangle [width=1, length=1]]
//[Circle [radius=1], Circle [radius=1]]